import { defineStore } from "pinia";
import axios from "axios";
import { ref } from 'vue'
export const useSideBarStore = defineStore('side', () => {
  const sideList = ref([])
  const oneList = ref([])
  const list = ref([])
  const activeFlag = ref(0);
  const parentType = ref('')
  const getSideList = async () => {
    let { data } = await axios.get('http://localhost:3000/asideList')
    oneList.value = data.splice(0, 1)
    sideList.value = data.splice(0, data.length)
    
  }
  return {
    getSideList, sideList, oneList,list,activeFlag,parentType
  }
})
